package com.physique.tea.Controller;

import com.physique.tea.Global.Result;
import com.physique.tea.Service.TcmSampleDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/tcmsampledata")
public class TcmSampleDataController {

    @Autowired
    TcmSampleDataService tcmSampleDataService;

    @GetMapping("/local")
    public Result getTcmSampleData(){
        return tcmSampleDataService.getTcmSampleData();
    }

    @GetMapping("/body")
    public  Result getTcmSampleDataBODY(@RequestParam("body") String body){
        return tcmSampleDataService.getTcmSampleDataBODY(body);
    }
    @GetMapping("/predict")
    public @ResponseBody Result getAllPredictData(){
        return tcmSampleDataService.getAllPredictData();
    }
    @GetMapping("/tea")
    public @ResponseBody Result getAllTea(){
        return  tcmSampleDataService.getAllTeaData();
    }
}
